package com.starryx.driverschool.service;

import com.starryx.driverschool.po.Train;
import com.starryx.driverschool.vo.TrainQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface TrainService {

    // 查询所有用户
    List<Train> listTrain();

    // 分页查询所有用户
    Page<Train> listTrain(Pageable pageable);

    // 分页查询所有用户
    Page<Train> listTrain(Pageable pageable, TrainQuery trainQuery);

    // 保存
    Train saveTrain(Train train);

    // 根据 id 查询
    Train getTrain(Long id);

    // 根据 id 删除
    void deleteTrain(Long id);
}
